1. Field of the Invention
The present invention relates to an image processing apparatus and method for encoding/decoding an image, and a storage medium storing this method.
2. Description of the Related Art
In accordance with recent remarkable developments in computers and networks, various kinds of sets of information, such as character data, image data, voice data and the like, are stored within a computer or transmitted between networks.
Among these data, an image, particularly a multivalue image, includes a very large amount of information. Hence, when storing/transmitting an image, the amount of data is very large. Accordingly, when storing/transmitting an image, high-efficiency encoding is adopted in which the amount of data is reduced by removing redundancy of the image, or changing the contents of the image to such a degree that degradation of the picture quality is hardly recognized visually.
A JPEG (Joint Photographic Experts Group) method recommended by ISO (International Organization for Standardization) and ITU-T (International Telecommunication Unionxe2x80x94Telecommunication Standardization Sector) is widely used as an internationally standardized high-efficiency encoding method. The JPEG method is based on discrete cosine transform, and has a problem such that block-shaped distortion is generated when increasing the rate of compression.
On the other hand, in apparatuses for inputting or outputting images, a higher rate of compression than in conventional cases is being requested, because higher resolution is required in order to improve the picture quality. In order to deal with such a request, an encoding method utilizing discrete wavelet transform has been proposed as a transform method different from the above-described discrete cosine transform.
The encoding method utilizing discrete wavelet transform has an advantage such that block-shaped distortion causing a problem in the above-described method utilizing discrete cosine transform seldom occurs.
Usually, in the above-described compression encoding method utilizing discrete wavelet transform, processing of transforming an image to be encoded is executed after storing the image in a frame memory for one picture frame, and data for one picture frame after being transformed is stored in the same frame memory or in another frame memory.
The frame memory used in this case can be easily secured in a system based on a computer, but is difficult to secure in a relatively inexpensive peripheral apparatus, such as a digital camera, a scanner, a printer or the like, due to limitations in circuit scale.
In such a case, the present invention is advantageous because an image to be encoded or compressed data of the image is desirably subjected to sequential transform processing (compression encoding) in units smaller than one picture frame, instead of being stored in a frame memory.
In consideration of various types of editing processing to be performed for an image to be encoded or encoded data, it is desirable to divide the image to be encoded or the encoded image into units smaller than one picture frame, particularly, in units of a block, comprising nxc3x97m pixels or the like, so as to easily assign a region in two-dimensional directions.
It is an object of the present invention to solve the above-described problems.
It is another object of the present invention to provide an optimum data arrangement for image data encoded using discrete wavelet transform so as to be efficiently dealt with in each apparatus.
It is still another object of the present invention to provide a method for obtaining, when dealing with image data encoded using discrete wavelet transform, image data having an optimum data arrangement which takes into consideration the capacity of a memory provided in an apparatus dealing with the image data.
It is yet another object of the present invention to provide a method for changing, when dealing with image data encoded using discrete wavelet transform so as to be adapted to an apparatus having a small memory capacity, the arrangement of the image data to an arrangement such that various types of image processing can be easily performed in a desired two-dimensional region.
According to one aspect of the present invention, an image processing apparatus includes input means for inputting first entropy encoded data corresponding to an image. The first entropy encoded data is data produced by entropy encoding a first set of transform coefficients obtained by performing wavelet transform of the image in units of a first type. The apparatus also includes arrangement changing means for entropy decoding the first entropy encoded data to obtain the first set of transform coefficients and for changing the first set of transform coefficients into a second set of transform coefficients corresponding to the result of performing wavelet transform of the image in units of a second type, and entropy encoding means for generating second entropy encoded data by entropy encoding the second set of transform coefficients.
According to another aspect of the present invention, an image processing apparatus includes input means for inputting first entropy encoded data corresponding to an image. The first entropy encoded data is data produced by entropy encoding a first set of transform coefficients obtained by performing wavelet transform of the image in units of a first type. The apparatus also includes arrangement changing means for entropy decoding the first entropy encoded data to obtain the first set of transform coefficients and for changing the first set of transform coefficients into a second set of transform coefficients corresponding to the result of performing wavelet transform of the image in units of a second type, and entropy encoding means for generating second entropy encoded data by entropy encoding the second set of transform coefficients. Furthermore, the apparatus includes an additional arrangement changing means for performing entropy decoding of the second entropy encoded data to obtain the second set of transform coefficients and for changing the second set of transform coefficients into a third set of transfor coefficients corresponding to the result of performing wavelet transform of the image in units of a third type, and additional entropy encoding means for generating third entropy encoded data by entropy encoding the third set of transform coefficients.
According to yet another aspect of the present invention, an image processing method includes an input step of inputting first entropy encoded data corresponding to an image. The first entropy encoded data is data produced by entropy encoding a first set of transform coefficients obtained by performing wavelet transform of the image in units of a first type. The method also includes an arrangement changing step of entropy decoding the first entropy encoded data to obtain the first set of transform coefficients and of changing the first set of transform coefficients into a second set of transform coefficients corresponding to the result of of performing wavelet transform of the image in units of a second type, and an entropy encoding step of generating second entropy encoded data by entropy encoding the second set of transform coefficients.
According to still another aspect of the present invention, in a storage medium storing an image processing program in a state of being readable by a computer, the program includes an input step of inputting first entropy encoded data corresponding to an image. The first entropy encoded data is data produced by entropy encoding a first set of transform coefficients obtained by performing wavelet transform of the image in units of a first type. The program also includes an arrangement changing step of entropy decoding the first entropy encoded data to obtain the first set of transform coefficients and of changing the first set of transform coefficients into a second set of transform coefficients corresponding to the result of performing wavelet transform of the image in units of a second type, and an entropy encoding step of generating second entropy encoded data by entropy encoding the second set of transform coefficients.
According to yet another aspect of the present invention, an image processing apparatus includes input means for inputting first entropy encoded data corresponding to an image. The first entropy encoded data is data produced by entropy encoding a first set of transform coefficients obtained by performing wavelet transform of the image in a first pixel order. The apparatus also includes arrangement changing means for entropy decoding the first entropy encoded data to obtain the first set of transform coefficients and for changing the first set of transform coefficients into a second set of transform coefficients corresponding to the result of performing wavelet transform of the image in a second pixel order, and entropy encoding means for generating second entropy encoded data by entropy encoding the second set of transform coefficients.
According to yet a further aspect of the present invention, an image processing method includes an input step of inputting first entropy encoded data corresponding to an image. The first entropy encoded data is data produced by entropy encoding a first set of transform coefficients obtained by performing wavelet transform of the image in a first pixel order. The method also includes an arrangement changing step of entropy decoding the first entropy encoded data to obtain the first set of transform coefficients and of changing the first set of transform coefficients into a second set of transform coefficients corresponding to the result of performing wavelet transform of the image in a second pixel order, and an entropy encoding step of generating second entropy encoded data by entropy encoding the second set of transform coefficients.
According to still another aspect of the present invention, in a storage medium storing an image processing program in a state of being readable by a computer, the program includes an input step of inputting first entropy encoded data corresponding to an image. The first entropy encoded data is data produced by entropy encoding a first set of transform coefficients obtained by performing wavelet transform of the image in a first pixel order. The program also includes an arrangement changing step of entropy decoding the first entropy encoded data to obtain the first set of transform coefficients and of changing the first set of transform coefficients into a second set of transform coefficients corresponding to the result of performing wavelet transform of the image in a second pixel order, and an entropy encoding step of generating second entropy encoded data by entropy encoding the second set of transform coefficients.
The foregoing and other objects, advantages and features of the present invention will become more apparent from the following description of the preferred embodiments taken in conjunction with the accompanying drawings.